<?php 

abstract class pageContent{
	
	protected $_actionContent 	= null;
	protected $_visibileContent = null;
	protected $_htmlPath		= null;
	protected $_htmlCode		= null;
	protected $_name			= null;
	protected $_pageTitle		= null;
	
	protected $_language		= null;
	
	//Errors Management
	protected $_valid			= null;
	protected $_errorContent	= null;
	
	function __construct(){
		global $language;
		$this->_language 		= $language;
		$this->_valid			= true;
		$this->_htmlPath		= HTML_PATH;
	}
	
	public function getTitle(){
		return $this->_pageTitle;
	}
	
	public abstract function manageAction($data);
	public abstract function manageVisible();		
	
	public function getAction(){
		return $this->_actionContent;
	}
	
	public function getVisibile(){
		return $this->_visibileContent;
	}
	
	public function getErrorMessage(){
		return $this->_errorContent;
	}
	
	public function isValid(){
		return $this->_valid;
	}
	
	/**
	 * Clean utf8 chars
	 */
	protected function __cleanUtf8($s){
		$v = array();
		foreach ($s as $index=>$value)
		$v[$index] = utf8_encode($value);
		return $v;
	}
	
}

?>